package com.zzty.taskapp.serviceImpl;

import com.zzty.taskapp.daoImpl.QuestionDAOImpl;
import com.zzty.taskapp.service.QuestionService;

public class QuestionServiceImpl implements QuestionService {

	public String getQuestion(String[] array) {
		QuestionDAOImpl q = new QuestionDAOImpl();
		String questions = "";
		for (int i = 0; i < array.length; i++) {
			questions = questions + (i + 1) + "." + q.getQuestionById(array[i]) + "\r\n";
		}
		return questions;
	}

	public int[] addQuestions(String[] questions) throws Exception {
		QuestionDAOImpl q = new QuestionDAOImpl();
		return q.addQuestions(questions);
		//return null;
	}
}
